Page allocation strategy for
multiprogramming systems with
virtual memory

ABSTRACT

A TIME SHARED VIRTUAL MEMORY SYSTEM CAN SHARE MAIN MEMORY AMONG PLURAL JOBS. WHEN A PAGE OF DATA NEEDED BY A JOB IS NOT IN MAIN STORAGE, A &#34;PAGE FAULT&#34; IS GENERATED CAUSING THE PAGE TO BE FETCHED FROM SECONDARY STORAGE INTO A MAIN STORAGE PAGE FRAME WHICH IS STOLEN BY A JOB WITH LESS THAN AVERAGE EXECUTION TIME PER FAULT FROM THE JOB WITH THE HIGHEST EXECUTION TIME PER FAULT. OTHER JOBS MUST USE UNHELD FRAMES OR REFILL A LEAST RECENTLY USED FRAME OWNED BY THAT JOB. TRACK IS KEPT OF THE AMOUNT OF ELAPSED EXECUTION (VIRTUAL) TIME USED BY THE JOB TO CALCULATE AVERAGE EXECUTION TIME. WAITING JOBS ARE PROMOTED INTO THE MULTIPROGRAMMING SET OF JOBS BEING PERFORMED. THE WSSE OF A JOB IS SET ARBITRARILY OR USED TO ALLOCATE THE NUMBER OF PAGE FRAMES FOR THE JOB FROM OTHER JOBS, PRESERVING CURRENT PROPORTIONAL FRAME ALLOCATION. A DEMOTED JOB RELEASED PAGE FRAMES TO BE AS-   SIGNED TO OTHER JOBS IN PROPORTION TO THEIR CURRENT OWNERSHIP OF FRAMES.

UNITED STATES PATENT AND TRiDEllLii-IK OFFICE 'tCtj of Defensive iil The heading of much abstract i: s v in the application as or'gimzlly iiie i. may be purchased [01 3t) cents a shout.

rilonr's "with the riotico 01' Dec. 16,1968, 86'.) (LG. 687. The

at lioretl ."ios and are arranged ehronolo'riczliiy. millin claims and sheets of drawings contained Lie to the public for inspection and reproduction A no to the merits of alleged invention. The Patent and .ii) assertion is [O the novelty or Eilfl uiselosod subject matter.

PUBLISHED NOVEMBER 4, 1975 Slit) ().G. 10

BLOCKS i i 15 l i L"; iifcmuira irtwmi FPEEMDTIUN A shared virtual memory system can share main nory among plural jobs. When a page of data needed by it job is not in main storage, a page fault is gen- 6 so causing the page to be fetched from secondary storage. into a main storage page frame which is stolen by a job with iess than average execution time per fault from the job with the highest execution time per fault. Other jobs must use unheld frames or refill a least rec ntly used frame owned by that job. Track is kept of to: amount of elapsed execution (virtual) time used by iilc job to caloulste average execution time. Waiting jobs are g -rorzxotcd into the multiprogrammirig set of jobs being performed. The WSSE of a job is set arbitrarily or Us d. to allocate the number of page frames for the job from other jobs, pr wing current proportional frame ahocaiiori. A demoieti job releases page frames to be as Sig-fled to other jobs in proportion to their current ownership of frames.

Nov. 4, 1975 I D. D. CHAMBERLINet a1. PAGE ALLOCATION STRATEGY FOR MULTIPROGRAMMING SYSTEMS WITH Original Filed March 13, 1974 FIG.1

VIRTUAL MEMORY SECONDARY STORAGE QUEUE L|ST)ING PAGING CHANNEL PAGING MAN AGER PAGE FAULTS MAIN STORAGE PAGE FRAMES SET I MPS MULTIPROGRAMMING SCHEDULER Sheet 1 of 3 PAGE FAULT ROUTINE JOB PROMOTION ROUTINE JOB DEMOTION ROUTINE JOB CONTROL BLOCKS VIRTUAL TIME CLOCK WORKING SET SIZE ESTIMATE I WSSE I PAGE TABLE LIST OF JOB FRAMES OWNED AND HELD JOB FAULT STACK DEMOTION PROMOTION WAITING JOBS Nov. 4, 1975 T940,018

Original Filed March 13, 1974 Sheet 2 of 3 FIG. 2

JOB J CENERATES A PAGE FAULT \20 COPY THE VIRTUAL TIME OF JOB J ONTO ITS FAULT STACK, \21

OELETING THE EARLIEST FAULT-TIME IF STACK IS FULL IS JOB J'S FAULT STACK FULL? YES IS THE EXECUTION TIME FORN FAULTS FOR JOB J LESS THAN /25 (AVERAGE TIME-THRESHOLD)? YES NO DOES JOB J oHH ANY FRAMEs HHTcH IT DOES HoT HOLD? 3 YES NO 27 2s STEAL A FRAME FRoM THE JOB IN THE MPS WHICH FETCH THE NEWLY- FETCH THE NEWLY- HAS THE GREATEST REFERENCED PAGE REFERENCEO PAGE EXECUTION TIME FOR INTO A FRAME INTO THE LEAST- N FAULTS. FETcH THE wHlcH JOB J RECENTLY-USED MEHLY-REFEREMcER PAGE owHs BUT DOES FRAME HELD BY INTO THIS FRAME. NOT HOLD JOB J EXIT ExTT EXIT Nov. 4, 1975 D. D. CHAMBERLINet a1. T940,018

PAGE ALLOCATION STRATEGY FOR MULTIPROGRAMMING SYSTEMS WITH VIRTUAL MEMORY Original Filed March 13, 1974 Sheet 3 of 3 DOES JOB J HAVE A WSSE IN ITS CONTROL BLOCK? -51 YES NO 52/ SET THE WSSE OF JOB .I

TO SOME FIXED INITIAL VALUE ARE THERE ANY OTHER JOBS IN THE MPS? -53 55 YES N0 STEAL PAGE FRAMES FROM EAcM JOB IN THE MPs,

PRESERVING THEIR CURRENT PROPORTIONAL OWNERSHIP OF FRAMES, AND STEALING GIVE JOB J A TOTAL NUMBER OF FRAMES EQUAL OWNERSHIP OF TO THE wssE or JOB J. GIVE JOB J ALL FRAMES OWNERSHIP or THE STOLEN FRAMES.

EXIT EXIT 56 A HG 4 JOB J IS DEMOTED FROM THE MPS SET THE WSSE 0F JOB J EouAL TO THE NUMBER OF PAGE FRAMES JOB J CURRENTLY oMMs ASSIGN OWNERSHIP OF THE PAGE FRAMES NOW OWNED BY JOB J AMONG THE OTHER MEMBERS OF THE MPS IN PROPORTION TO THEIR CURRENT OWNERSHIP OF FRAMES EXIT 

